package com.limh.blehelper.event;

import android.bluetooth.BluetoothDevice;

import java.util.List;

/**
 * Function:
 * author: limh
 * time:2018/1/29
 */

public class ScanEvent {
    /**
     * 开始扫描
     */
    public static final int SCAN_START = 0x01;
    /**
     * 正在扫描
     */
    public static final int SCAN_FOUND = 0x02;
    /**
     * 停止扫描
     */
    public static final int SCAN_FINISH = 0x03;

    /**
     * 扫描状态
     */
    private int scanStatus;
    /**
     * 扫描结果
     */
    private BluetoothDevice device;

    private List<BluetoothDevice> scaningList;

    public ScanEvent(int scanStatus) {
        this.scanStatus = scanStatus;
    }

    public ScanEvent(int scanStatus, BluetoothDevice device) {
        this.scanStatus = scanStatus;
        this.device = device;
    }

    public ScanEvent(int scanStatus, List<BluetoothDevice> scaningList) {
        this.scanStatus = scanStatus;
        this.scaningList = scaningList;
    }

    public int getScanStatus() {
        return scanStatus;
    }

    public ScanEvent setScanStatus(int scanStatus) {
        this.scanStatus = scanStatus;
        return this;
    }

    public BluetoothDevice getDevice() {
        return device;
    }

    public ScanEvent setDevice(BluetoothDevice device) {
        this.device = device;
        return this;
    }

    public List<BluetoothDevice> getScaningList() {
        return scaningList;
    }

    public ScanEvent setScaningList(List<BluetoothDevice> scaningList) {
        this.scaningList = scaningList;
        return this;
    }
}
